# -*- coding: utf-8 -*-

import sys
from main_ui import Ui_MainWindow
from PyQt5.QtWidgets import QApplication, QMainWindow


class main(QMainWindow, Ui_MainWindow):
    def __init__(self):
        super(main, self).__init__()
        self.setupUi(self)
        self.pushButton.clicked.connect(self.change_text)
        self.count = 0

    def change_text(self):
        self.count = self.count + 1

        if self.count % 2 == 1:
            self.pushButton.setText('Stop')

        else:
            self.pushButton.setText('Start')


if __name__ == '__main__':
    app = QApplication(sys.argv)
    ui = main()
    ui.show()
    sys.exit(app.exec_())
